package org.jeecg.modules.appuser.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.appuser.entity.TbUserNotice;
import org.jeecg.modules.appuser.mapper.TbUserNoticeMapper;
import org.jeecg.modules.appuser.service.ITbUserNoticeService;
import org.jeecg.modules.mall.service.ITbMnUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: app用户消息
 * @Author: jeecg-boot
 * @Date:   2020-05-18
 * @Version: V1.0
 */
@Service
public class TbUserNoticeServiceImpl extends ServiceImpl<TbUserNoticeMapper, TbUserNotice> implements ITbUserNoticeService {


    public IPage<TbUserNotice> page(Page<TbUserNotice> page, TbUserNotice tbUserNotice ) {

        return page.setRecords(this.baseMapper.getAllDataByUserId(page, tbUserNotice));
    }

    @Override
    public TbUserNotice addUserNotice(TbUserNotice tbUserNotice) {
        this.save(tbUserNotice);
        return tbUserNotice;
    }


}
